/**
 * File: RandomAccessStreamProvider.java
 * Created by: mhaimel
 * Created on: Aug 1, 2011
 * CVS:  $Id: RandomAccessStreamProvider.java 1.0 Aug 1, 2011 4:09:08 PM mhaimel Exp $
 */
package uk.ac.ebi.curtain.storage.sequence;

import java.io.File;
import java.io.IOException;

/**
 * @author mhaimel
 *
 */
public class RandomAccessStreamProvider implements StreamProvider<InputRandomAccessStream> {
	private final File file;

	public RandomAccessStreamProvider(File file) {
		this.file = file;
	}

	@Override
	public InputRandomAccessStream openAndGetStream() throws IOException {
		return new InputRandomAccessFile(file);
	}

	@Override
	public String getName() {
		return this.file.getAbsolutePath();
	}

}
